package com.hung.tripleregistry.dao;

import com.hung.tripleregistry.core.model.RpcRegistryData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Hung
 * @date 2022/10/3 21:33
 */
@Mapper
public interface RpcRegistryDataMapper {


    public int refresh(@Param("rpcRegistryData") RpcRegistryData rpcRegistryData);

    public int add(@Param("rpcRegistryData") RpcRegistryData rpcRegistryData);


    public List<RpcRegistryData> findData(@Param("env") String env,
                                          @Param("key") String key);

    public int cleanData(@Param("timeout") int timeout);

    public int deleteData(@Param("env") String env,
                          @Param("key") String key);

    public int deleteDataValue(@Param("env") String env,
                               @Param("key") String key,
                               @Param("value") String value);

    public int count();

}

